https://leetcode.cn/problems/last-stone-weight/description/
class Solution {
public:
    int lastStoneWeight(vector<int>& stones) {
        int n=stones.size();
        if(n==1)
            return stones[0];
        priority_queue<int> _q;
        for(auto x:stones)
        {
            _q.push(x);
        }
        while(_q.size()>1)
        {
            int x=_q.top();_q.pop();
            int y=_q.top();_q.pop();
            if(x-y)
                _q.push(x-y);
        }
        return _q.empty()?0:_q.top();

    }
};